-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to SDK 34 #5790
Upgrade to SDK 34 #5790
Conversation
For optimized code only
Additionally, add Jetpack Compose to the project
DescriptionActivity should not be exposed
Additionally, add final keywords to reduce compiler warnings
Implement using composeView
I get This repository/branch solves the problem, so would you mind pulling from it? [email protected]:kanahia1/apps-android-commons.git:issue5583 Thanks a lot! :-) |
For optimized code only
Additionally, add Jetpack Compose to the project
DescriptionActivity should not be exposed
Additionally, add final keywords to reduce compiler warnings
Implement using composeView
That branch has so many changes and I looked at the progress bar part. The code was removed and commented out as I did on my local machine. What about I add a new progress bar using Jetpack and push the latest changes or wait for kanahia's PR to get merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new UI looks good! :)
Haven't reviewed completely or tested yet, but skimmed through it and had some feedback to share.
That would be fantastic, thanks a lot. 🙂 |
The fragments were built in Java so I had to replace the circular progress bar with the material one(XML Views). |
Hey @nicolas-raoul, please try opening settings from the app. On my device, the app is crashing and maybe, this is the reason that |
I didn't checked for an empty account. Checking if it is minor bug, then I'll fix it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skimmed through the code again, had a few minor suggestions. Need some time to upgrade my Android Studio (the AGP version in this PR is not compatible with mine) but will hopefully test it soon. Thanks for refactoring the code as well 🙂
app/src/main/java/fr/free/nrw/commons/upload/worker/UploadWorker.kt
Outdated
Show resolved
Hide resolved
Any idea why the app is no longer showing notification for the foreground service or even the ongoing uploads? We currently display two of them, but on this branch I see none. |
No idea :( |
It didn't ask me for notification permission at all. Happened on a fresh installation. The app asks for it in the beginning itself on the main branch |
But, it asked me when I opened that newly implemented screen for managing uploads. Same behavior on the main branch. I think the app is asking for notification permission only when needed or after some time, not sure either. |
I've tried reinstalling the app to observe if that notification permission pops up, but I'm still waiting. It's been over 15 minutes already, I'm uploading pictures but not getting any notification or any dialog requesting access. |
Custom selector is now working fine 🎉 The location info is not getting redacted and I can see the Commons logo on already uploaded images now |
What is the procedure to repeat that location reading process? Need to check if that is working fine on the main or not. |
Closed and reopened the app and got this crash:
Please don't worry if this is not related to your changes. Let's keep a track of this, though. I'll raise a separate issue if I face it frequently on the main branch as well. |
Did you try the same on the main. Because even on main branch the app is not requesting the notification permission. I tried it myself just few minutes ago. |
Okay 👍, that'll be nice :) |
But you still see the notifications, right? 🤔 |
No, I tried uploading a new picture from the main branch version but no notifications showed up. So, I opened the screen where we can manage uploads and then the app asked me for notification permission. After that, the uploading seemed to restart (Not sure) and both notifications were showing. |
I've opened the pending uploads screen several times on this branch but didn't get that permission popup. Testing on main now. |
Just to be sure. Did you open that screen just after starting a new upload? Because ongoing uploads are the reason to ask for notification permission, not opening that screen only. However, it seems another issue and out of the scope of this PR. What do you think? |
Yes.
Bumping versions does break things. And if notifications for foreground services have disappeared without the user dismissing them, we cannot rest assured that they would work as intended without tesing completely. I'm sorry if you found this unrelated - I'm just testing and sharing what is different on this branch. |
I tried uploading a picture that has a location in its EXIF and the app can read the location info from EXIF of the image after the recent commit. However, I am getting these errors on the logs on this PR and main as well. |
You are right, bumping to a new SDK definitely can break other parts. However, it's working on API 34 but the behavior could be different on other versions. What API level you are testing on? |
I'm testing on Android 14 (API level 34). |
Now, what am I supposed to do? I am so confused :( |
@RitikaPahwa4444, I can make the app request |
Hey @rohit9625, I would need some time to check on the notifications issue along with the issue mentioned in this comment. Until then, please don't consider them as a blocker. The location issue seems sorted for me at least, but I'll share if I find any errors in my logs. Keeping the notifications issue aside, uploads seem to work fine for me while I'm using the app. |
Thank you @RitikaPahwa4444 & @nicolas-raoul for your time on this PR :) |
I believe Ritika wrote that there is no blocker, so I will merge this. |
Description (required)
Fixes #5770
What changes did you make and why?
1. Add functionality to work with
Partial Access
on API >= 34ComposeView
.READ_MEDIA_VISUAL_USER_SELECTED
permission in Manifest File and limit some permissions to a specific SDK.2. Upgrade AGP to latest and targetSDK/compileSDK to 34
3. Minor refactoring
Partial Access
was causing some crashes for specific actions. That's why I need to make some changes to files under theCustom Selector
package.4. Replace deprecated circular progress bar
activity_quiz_result
andfragment_achievements
and add new material circular progress barTests performed (required)
Tested ProdDebug on Samsung A14(API 34), Realme Narzo 50(API 33), Pixel 5 Emulator(API 29), and Pixel 6 Emulator(API 31).
Screenshots (for UI changes only)